﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Googler.BLL
{
    public class NotificationMessage
    {
        /// <summary>
        ///      How many tabs to add before the notification message
        /// </summary>
        public int Ident { get; set; }
        public object Sender { get; set; }
        public string Text { get; set; }
        public DateTime? TimeStamp { get; set; }

        public override string ToString()
        {
            string textWithIdents = "";
            for (int i = 0; i < Ident; i++)
            {
                textWithIdents += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
            }
            textWithIdents += Text;

            if (TimeStamp != null)
            {
                return (textWithIdents + Convert.ToDateTime(TimeStamp).ToHumman());
            }
            return textWithIdents;
        }
    }
}
